const GEEK_TOKEN_KEY = 'geek-pc-token'

// 创建 获取token
export const getToken = () => localStorage.getItem(GEEK_TOKEN_KEY)

// 创建 设置token
export const setToken = token => localStorage.setItem(GEEK_TOKEN_KEY, token)

// 创建 清除token
export const clearToken = () => localStorage.removeItem(GEEK_TOKEN_KEY)

// 创建 根据token判断是否登录
export const isAuth = !!getToken()
